const fs = require('fs');
const path = require('path');
const dotenv = require('dotenv');
dotenv.config();

const APP_PRIVATE_KEY = fs.readFileSync(
  path.resolve(__dirname, './key/rsa_private_key.pem')
);
const APP_PUBLIC_KEY = fs.readFileSync(
  path.resolve(__dirname, './key/rsa_public_key.pem')
);

const {
  APP_PORT,
  APP_SECERT,
  MYSQL_HOST,
  MYSQL_PORT,
  MYSQL_DB,
  MYSQL_USER,
  MYSQL_PASSWORD,
  MYSQL_CONNECT_LIMIT,
} = process.env;

module.exports = {
  APP_PRIVATE_KEY,
  APP_PUBLIC_KEY,
  APP_PORT,
  APP_SECERT,
  MYSQL_HOST,
  MYSQL_PORT,
  MYSQL_DB,
  MYSQL_USER,
  MYSQL_PASSWORD,
  MYSQL_CONNECT_LIMIT,
};
